import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';

class LoginState implements Cloneable<LoginState> {
  TextEditingController textTelephoneView;
  TextEditingController textVerifyCodeView;
  bool showClearButton = true;
  int sex = -1;
  // 最大倒数时间
  int maxCountTime = 30;

  // 当前倒数时间
  int currCountTime = 0;

  @override
  LoginState clone() {
    return LoginState()
      ..textVerifyCodeView = textVerifyCodeView
      ..textTelephoneView = textTelephoneView
      ..currCountTime = currCountTime
      ..sex = sex
      ..maxCountTime = maxCountTime;
  }
}

LoginState initState(Map<String, dynamic> args) {
  LoginState state = LoginState();
  state.textTelephoneView = TextEditingController();
  state.textVerifyCodeView = TextEditingController();

  return state;
}
